package com.api.shopapi.service;

import com.api.shopapi.entity.User;
import com.api.shopapi.entity.dto.UserDTO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserService {

    int insert(User user);

    int update(User user);


    int updateName(User user);

    User getByUserCode(String userCode);

    UserDTO getByForUserDTO(String userCode);

    User getByPhone(String phone);

    User getByLoginName(String loginName);

    User getByPhoneAndPassword(String phone, String password);

    User getByLoginNameAndPassword(String loginName, String password);

    PageInfo<UserDTO> getListForAdmin(int pageIndex,int pageSize, String governmentCode,String name,String phone);

    PageInfo<UserDTO> getListForGov(int pageIndex,int pageSize, String governmentCode,String name,String phone);


    List<User> getListAll();

    List<UserDTO> listByNamePhone(String name, String phone, String loginName);


}
